package 第一题;

import java.util.Scanner;

/**
 * ClassName: Adress
 * Package: 第一题
 * Description:编写并测试一个代表地址的Address类，地址信息由国家、省份、城市、街道、邮编组成，并可以返回完整的地址信息。
 *
 * @Author fjorid
 * @Create 2025/1/11 20:21
 * @Version 1.0
 */
public class Adress {
    public static void main(String[] args) {
        Adress adress = new Adress();
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入所在国家");
        adress.country = scanner.nextLine();
        System.out.println("请输入所在省份");
        adress.province = scanner.nextLine();
        System.out.println("请输入所在城市");
        adress.city = scanner.nextLine();
        System.out.println("请输入所在街道");
        adress.street = scanner.nextLine();
        System.out.println("请输入所在邮编");
        adress.postcode = scanner.nextLine();
        System.out.println(adress.adressShow());

    }

    String country, province, city, street, postcode;

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        this.street = street;
    }

    public String getPostcode() {
        return postcode;
    }

    public void setPostcode(String postcode) {
        this.postcode = postcode;
    }

    public String adressShow() {
        return "国家是" + country + "省份是" + province + "城市是" + city + "街道是" + street + "邮编是" + postcode;
    }
}
